<?php
namespace Nawa\MedicalStudy\MedicalCenter\Monitoring\Survey;
/**
 * Medical Center Monitoring Survey Section 
 *
 * It's a copy of the orignal Survey Section
 *
 * @author Xavier VILAIN
 * @package Nawa\MedicalStudy\MedicalCenter\Monitoring\Survey
 * @license #license-nawa-survey#
 *
 * @property int	$msid				Id of the medical study
 * @property int	$mcid				Medical Center
 * @property int	$monitoringid		Monitoring Id
 * @property int	$surveyid 			Id of the survey template
 * @property int	$sectiondid			Id of the section
 * @property int	$parentid			Parent Section (not used)
 * @property float	$progress			% of progress
 * 
 */
class Section extends \Fox\Object {
		
	/**
	 * Link to the survey object
	 * @var string
	 */
	const LINK_SURVEY = 'survey';
	
	/**
	 * Link to question
	 * @var string
	 */
	const LINK_QUESTIONS = 'questions';
	
}
\Fox\Dao::infos(Section::className(),
new \Fox\Object\Info('ms_mc_monitoring_survey_sections', \Fox\Databases::DB_APP)
);
// Link To External Question
\Fox\Object\Links::add(\Fox\Dao::link(Question::className(),Question::LINK_SECTION)
	->to(Section::className(),Section::LINK_QUESTIONS)
	->on('msid','mcid','monitoringid','surveyid','sectionid')
);